package com.wr.recruit.service.dao.repo;

import com.wr.recruit.service.dao.dbo.UserDbo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface UserRepo extends JpaRepository<UserDbo, Integer>,JpaSpecificationExecutor<UserDbo> {

    UserDbo findAllByUserName(String userName);

    UserDbo findAllById(Integer id);

    int countAllByCompanyCodeAndRoleId(String companyCode, int roleId);

    List<UserDbo> findAllByIdIn(List<Integer> ids);

}
